###########################################################################
# TSL-BIBLIOTHEK:	FRM_date_Lib
###########################################################################
# $Revision: 1.6 $
# $Author: cbueche $
# $Date: 2001/07/25 08:52:54 $
# $Source: 
# $NoKeywords: $
###########################################################################
#**# 
#*	Diese Library enthlt Funktionen die zur Ausfhrung der
#*	Benutzerverwaltung bentigt werden. 
#*	
#*@Author: cbueche 
#*/

#**
#*	FRM_route whlt eine Route
#*
#* @param table	(in)	Index der Tabelle mit den Testdaten
#* @param test	(in)	Name der Spalte mit den Testdaten
#* @param idx	(in)	Name des Testblocks
#* @param mode	(in)	SET/CHK/GEN
#* @return
#*	E_OK:	erfolgreich
#*	else:	fehlerhaft
#*/

public function FRM_route ( in table, in test, in idx, in mode )
{
	auto rc,val;
	rc = FRM_init_block( table, test, idx, mode );
	if ( rc != E_OK )
		return rc;
	rc+=set_window( "Flight Reservation", 5 );
	rc+=FRM_list_select_item( table, test, "Fly From:" );
	rc+=FRM_list_select_item( table, test, "Fly To:" );
	rc+=FRM_button_press( table, test, "Flights..." );
	return rc;
}

public function FRM_flight_table ( in table, in test, in idx, in mode )
{
	auto rc,i,val,column,text,out_cols_count[],out_text[];
	rc = FRM_init_block( table, test, idx, mode );
	if ( rc != E_OK )
		return rc;
	rc+=set_window( "Flights Table", 5 );
	rc+=FRM_get_next( table,test,val );
	if ( rc == E_OK )
	{
		rc+=tbl_set_selected_cell ( "grdFlightTable",val,"#1" );
		for (i=1; i<=7; i++)
		{
			rc+=tbl_get_column_name ("grdFlightTable", i, out_cols_count[i] );
			rc+=tbl_get_cell_data ( "grdFlightTable", val,"#"&i ,out_text[i] );
			column=column&" | "& out_cols_count[i];
			text=text&" | "&out_text[i];
		}
		report_msg( "FlightTable displayed " & column  );
		report_msg( "FlightTable displayed " & text  );
	}
		else if (rc == E_FRM_SKIP)
		rc = E_OK;
	else
		return rc;
	rc+=FRM_button_press( table, test,"OK");
	rc+=FRM_button_press( table, test,"Cancel");
	return rc;
}

